import taichi as ti
import numpy as np

ti.init()

@ti.func
def triple(x):
    return x*3+1

@ti.kernel
def triple_array()->ti.f32: 
    for i in range(128):
        a[i] = triple(a[i])

# triple_array()
a = ti.field(dtype=ti.f32,shape=128)
triple_array()
print(a)
